package com.dominos.voldemortstress;

import voldemort.client.ClientConfig;
import voldemort.client.StoreClient;
import voldemort.client.StoreClientFactory;
import voldemort.versioning.Versioned;

public class VoldemortSimpleStoreClient implements VoldemortStoreClient {

	private StoreClient<Object, Object> storeClient;
	private StoreClientFactory storeClientFactory;
	private ClientConfig clientConfig;

	@Override
	public void setStoreClient(StoreClient<Object, Object> storeClient) {
		this.storeClient = storeClient;

	}

	@Override
	public void setClientConfig(ClientConfig clientConfig) {
		this.clientConfig = clientConfig;

	}

	@Override
	public void setStoreClientFactory(StoreClientFactory storeClientFactory) {
		this.storeClientFactory = storeClientFactory;

	}

	@Override
	public ClientConfig getClientConfig() {
		return clientConfig;
	}

	@Override
	public StoreClient<Object, Object> getStoreClient() {
		return storeClient;
	}

	@Override
	public StoreClientFactory getStoreClientFactory() {
		return storeClientFactory;
	}

	@Override
	public void close() {
		storeClientFactory.close();
	}

	@Override
	public Versioned<Object> get(Object key) {
		return storeClient.get(key);
	}

	@Override
	public void put(Object key, Object value) {
		storeClient.put(key, value);
	}

}
